<div class="full_w">
    <div class="h_title"><?php echo Yii::t('AdmincpModule.admincp', 'Add Album'); ?></div>
    <?php 
        foreach(Yii::app()->admin->getFlashes() as $key => $message){
            echo '<div class="n_'.$key.'"><p>'.$message."</p></div>\n";
        }
    ?>
    <form method="post">
        <div class="element">
            <label for="name">Title <span class="red">*</span></label>
            <input type="text" name="post[post_title]" id="title" class="text required" value="<?php echo isset($arrItemInfo['post_title'])?$arrItemInfo['post_title']:null; ?>">
        </div>
        <div class="element">
            <label for="name">Body text:</label>
            <textarea name="post[post_body]" class="textarea" id="body"><?php echo isset($arrItemInfo['post_body'])?$arrItemInfo['post_body']:null; ?></textarea>
        </div>  
        <div class="element">
            <label for="name">Tag</label>
            <input type="text" name="tags" id="tags" class="text" value="<?php echo isset($arrItemInfo['post_tags'])?$arrItemInfo['post_tags']:null; ?>">
        	<p class="description">Separate tags with commas</p>
        </div>
        <div class="element">
            <label for="name">Status</label>
            <select id="post_status" name="post[post_status]" class="required">
            	<?php $arrPostStatus = Posts::getInstance()->getListStatus(); 
				foreach ($arrPostStatus as $key=>$R): ?>
                <option value="<?php echo $key; ?>" <?php if(isset($arrItemInfo['post_status']) && $arrItemInfo['post_status'] == $key): ?>selected="selected"<?php endif; ?>><?php echo $R; ?></option>
                <?php endforeach; ?>
            </select>
        </div>      
        <div class="entry">
            <input type="hidden" name="id" id="id" value="<?php echo isset($arrItemInfo['post_id'])?$arrItemInfo['post_id']:null; ?>">
            <button type="submit">Save</button> <button>Cancel</button>
        </div>
    </form>
</div>
<script type="text/javascript" src="js/media-popup.js"></script>